<?php 
	require_once("../dompdf/dompdf_config.inc.php");
	$conexion = mysql_connect("localhost","root","");
	mysql_select_db("limasys-bd",$conexion);

$codigoHTML='
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Lista</title>
</head>

<body>
<div align="left"><img src="../imagenes/ctp.png" width="60" height="80"/></div>
<br></br>
<div align="center">
    <table width="100%" border="1">
      <tr>
        <td bgcolor="#0099FF"><strong>ID</strong></td>
        <td bgcolor="#0099FF"><strong>Usuario</strong></td>
        <td bgcolor="#0099FF"><strong>Accion</strong></td>
        <td bgcolor="#0099FF"><strong>Tabla</strong></td>
        <td bgcolor="#0099FF"><strong>Fecha y Hora</strong></td>
        <td bgcolor="#0099FF"><strong>Descripcciones</strong></td>
      	<br></br>
      	<br></br>
      	<div align="right"><img src="../imagenes/limasys.png" width="50" height="50"/></div>
      	<br></br>
      	<br></br>
      </tr>';


        $consulta=mysql_query("SELECT * FROM ls_11_bitacoratransaccional");
        while($dato=mysql_fetch_array($consulta)){
$codigoHTML.='
      <tr>
        <td>'.$dato['LS00ID'].'</td>
        <td>'.$dato['LS01IDUS'].'</td>
        <td>'.$dato['LS03AC'].'</td>
        <td>'.$dato['LS04TB'].'</td>
        <td>'.$dato['LS05FH'].'</td>
        <td>'.$dato['LS06DC'].'</td>
        
      </tr>';
      } 
$codigoHTML.='
    </table>
</div>
</body>
</html>';

$codigoHTML=utf8_decode($codigoHTML);
$dompdf=new DOMPDF();
$dompdf->load_html($codigoHTML);
ini_set("memory_limit","128M");
$dompdf->render();
$dompdf->stream("Bitacora.pdf");
?>